home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 13 / AMIGAplus Sonderheft 13 (1998)(ICP)(DE)[!].iso / rexx / factorial.scrx < prev    next >
Text File  |  1997-11-01  |  436b  |  23 lines

  1. /*        SciCalc Scientific Calculator
  2.         by Brian Savage Copyright 1997
  3.                 
  4.         Arexx script to find the factorial of an integer
  5.         less than 70.  x >= 0; x<70
  6.  
  7.           IMPORTANT: REQUIRES REXXMATHLIB.LIBRARY
  8. */
  9.  
  10. if ~show("l", "rexxmathlib.library") then
  11.     if ~addlib("rexxmathlib.library", 0, -30,0) then
  12.     do
  13.       address command
  14.       say  "Can't find RexxMathLib"
  15.     end
  16.  
  17. options results
  18.  
  19. getval
  20.  
  21. parse var result x
  22.  
  23. putval fact(x)